import { Post } from '../../config.js'

class Api {
  /**
   * 阿里oss获取上传资质
   * @return {promise} api
   */
  getOssPolicy (params) {
    const data = {
      Copyright: 'v1',
      Interface: 'Oss',
      Command: 'getOssPolicy',
      Params: { dir: 'user/', ...params }
    }
    return Post(data)
  }
}

const GlobalService = new Api()
export default GlobalService
